package org.charles.zhifou.model.dto.scoringResult;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 创建评分结果请求
 *
 * @author Charles
 * @version 1.0
 */
@Data
public class ScoringResultAddRequest implements Serializable {

    @Schema(description = "结果名称")
    @Length(min = 1, max = 32, message = "结果名称不能为空且长度不能超过 32 个字符")
    private String resultName;

    @Schema(description = "结果描述")
    @Length(min = 1, max = 256, message = "结果描述不能为空且长度不能超过 256 个字符")
    private String resultDesc;

    @Schema(description = "结果图片")
    private String resultPicture;

    @Schema(description = "结果属性集合 JSON，如 [I,S,T,J]")
    @NotNull(message = "结果属性集合不能为空")
    private List<String> resultProp;

    @Schema(description = "结果得分范围下限, 如 80, 表示 80及以上的分数命中此结果")
    private Integer resultScoreRange;

    @Schema(description = "应用 id")
    @Min(value = 1, message = "应用 id 必须大于 0")
    private Long appId;

    @Serial
    private static final long serialVersionUID = 1L;
}